package com.totem.base.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Slf4j
@Configuration
public class SecurityConfig {
    @Bean
    SecurityFilterChain web(HttpSecurity http) throws Exception {
        http.csrf().disable()
            .authorizeHttpRequests().anyRequest().permitAll();
        /*
        http.authorizeHttpRequests()
                .antMatchers("/admin/config/server")
                .permitAll()
                .anyRequest()
                .authenticated()
                .and()
                .csrf().disable()
        ;*/
        return http.build();
    }
}
